<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Spring MVC | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="Spring MVC 学习笔记">
<meta property="og:type" content="article">
<meta property="og:title" content="Spring MVC">
<meta property="og:url" content="http://example.com/2022/01/17/SpringMVC/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="Spring MVC 学习笔记">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2022-01-17T05:14:47.000Z">
<meta property="article:modified_time" content="2022-01-20T13:00:19.581Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 6.0.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-SpringMVC" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2022/01/17/SpringMVC/" class="article-date">
  <time class="dt-published" datetime="2022-01-17T05:14:47.000Z" itemprop="datePublished">2022-01-17</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      Spring MVC
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="Spring-MVC-学习笔记"><a href="#Spring-MVC-学习笔记" class="headerlink" title="Spring MVC 学习笔记"></a>Spring MVC 学习笔记</h1> <span id="more"></span> 

<hr>
<p>SSM: Spring+Spring MVC+Mybatis</p>
<p>JavaSE:<br>JavaWeb：<br>框架：</p>
<p>Spring MVC、vue、SpringBoot、SpringCloud、linux</p>
<p>SpringMVC执行流程</p>
<hr>
<ul>
<li><p>MVC ： </p>
<ul>
<li>模型Model(dao,service) </li>
<li>视图View(jsp) </li>
<li>控制器Controller(servlet)</li>
</ul>
</li>
<li><p>MVC 是一种软件设计规范</p>
</li>
<li><p>MVC 不是一种设计模式，是一种架构模式</p>
</li>
<li><p>JSP 本质就是Servlet</p>
</li>
<li><p>Servlet</p>
</li>
<li><p>MVC做的事情</p>
</li>
</ul>
<ol>
<li>将URL映射到java类或java类的方法</li>
<li>封装用户提交的数据</li>
<li>处理请求、调用相关业务处理、封装响应数据</li>
<li>渲染响应数据 .jsp/html等表示层数据</li>
</ol>
<ul>
<li><p>常见服务器端MVC框架：Struts、Spring MVC、ASP.NET MVC、Zend Freamwork、JSF</p>
</li>
<li><p>常见前端MVC框架：vue、angularjs、react、backbone</p>
</li>
<li><p>由MVC演化出的另外一些模式：MVP、MVVM(M V VM(ViewModel：双向绑定))</p>
</li>
</ul>
<hr>
<ul>
<li><p>Spring MVC：基于java实现的MVC轻量级Web框架</p>
</li>
<li><p>特点：</p>
<ul>
<li>轻量级</li>
<li>高效、基于请求响应的MVC框架</li>
<li>与Spring兼容性好</li>
<li>约定优于配置</li>
<li>功能强大</li>
<li>简洁灵活</li>
</ul>
</li>
<li><p>Spring MVC原理</p>
</li>
</ul>
<ol>
<li><p>DispatcherServlet-&gt;HandlerMapping-&gt;HandlerExecution-&gt;DispatcherServlet</p>
</li>
<li><p>DispatcherServlet-&gt;HandlerAdapter-&gt;Controller(调业务层)-&gt;HandlerAdapter-&gt;DispatcherServlet</p>
</li>
<li><p>DispatcherServlet-&gt;ViewResolver-&gt;DispatcherServlet-&gt;View</p>
</li>
</ol>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2022/01/17/SpringMVC/" data-id="ckymzfig50003gsv35ar54vgo" data-title="Spring MVC" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2022/01/20/Spring/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Spring
        
      </div>
    </a>
  
  
    <a href="/2022/01/16/MyBatis/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">MyBatis</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/01/">January 2022</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2022/01/20/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2022/01/20/Spring/">Spring</a>
          </li>
        
          <li>
            <a href="/2022/01/17/SpringMVC/">Spring MVC</a>
          </li>
        
          <li>
            <a href="/2022/01/16/MyBatis/">MyBatis</a>
          </li>
        
          <li>
            <a href="/2022/01/14/SpringBoot/">SpringBoot</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2022 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.4.1.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>